if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_GetAllFactory]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_GetAllFactory]
GO
CREATE PROC sp_GetAllFactory
AS
BEGIN
	SELECT ID, FactoryName, Phone, Description, Status FROM Factory
END